<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 定义函数
        function f1(){
            console.log(111)
        }

        // 调用函数
        // f1()

        function sum(num1, num2){
            console.log(num1, num2)
            var result = num1 + num2
            return result
        }

        // console.log(sum(2,5))
        // console.log(sum(2,5,4))
        // console.log(sum(2))


        window.onclick = function(){ // 回调函数/匿名函数
            console.log('窗口被点击了。。。。。。')
        }



    </script>
</head>
<body>
    
</body>
</html>